﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manageweb_Stock_StockBalanceAdmin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["MasterID"] == null)
        {
            Response.Redirect("~/manageweb/default.aspx");
        }
    }
    protected void Btn_Submit_Click(object sender, EventArgs e)
    {
        BindBalance();
    }

    protected void BindBalance()
    {
        SQLExpressDAL.DealRecord obj = new SQLExpressDAL.DealRecord();
        this.GV_StockBalance.DataSource = obj.GetStockBalance(this.txtUserAccount.Text.Trim(), this.txtBeginDate.Text, this.txtEndDate.Text);
        this.GV_StockBalance.DataBind();
    }


    protected void GV_StockBalance_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GV_StockBalance.PageIndex = e.NewPageIndex;
        BindBalance();
    }
}
